/* CONTROVERSY AND COSTS */

*UNIVERSITY OF DELAWARE, CENTER FOR POLITICAL COMMUNICATION, NATIONAL AGENDA SURVEY (CPC-NAS)

use  "Controversy_and_Costs_Replication_UDCPCNAS.dta" // note:  Stata v.13

******************
*Experiment
******************
*Obtaining Mean Support for ID Requirement

	*All respondents
mean condprescore // baseline support for general policy
estimates store condpre

mean cond0score // "New ID" control condition support
estimates store cond0

mean cond1score // "Show Proof" condition support
estimates store cond1

mean cond2score // "Show Proof & No Cost" condition support
estimates store cond2

mean cond3score // "Show Proof + Small Fee" condition support
estimates store cond3


	*Democrats
mean condprescore if D0R1==0 // baseline support for general policy
estimates store condpreD

mean cond0score if D0R1==0 // "New ID" control condition support
estimates store cond0D

mean cond1score if D0R1==0 // "Show Proof" condition support
estimates store cond1D

mean cond2score if D0R1==0 // "Show Proof & No Cost" condition support
estimates store cond2D

mean cond3score if D0R1==0 // "Show Proof + Small Fee" condition support
estimates store cond3D

	*Republicans
mean condprescore if D0R1==1 // baseline support for general policy
estimates store condpreR

mean cond0score if D0R1==1 // "New ID" control condition support
estimates store cond0R

mean cond1score if D0R1==1 // "Show Proof" condition support
estimates store cond1R

mean cond2score if D0R1==1 // "Show Proof & No Cost" condition support
estimates store cond2R

mean cond3score if D0R1==1 // "Show Proof + Small Fee" condition support
estimates store cond3R

***********
*Figure 7:  All respondents
*Note: Some additional formatting may have been done using Graph Editor
***********

*install coefplot package

coefplot condpre cond0 cond1 cond2 cond3, vertical recast(bar) barwidth(0.5) fcolor(*.5) ///
ciopts(recast(rcap)) citop  scheme(plottig) plotregion(margin(medium) fcolor(gs15)) legend(off)  ///
xtitle("{bf:Costliness of Obtaining Identification}", size(small)) ///
ytitle("Support for Voter Identification Law", size(medium)) 

***********
*Figure 8:  
*Note: Some additional formatting may have been done using Graph Editor
***********

	*Democrats
coefplot condpreD cond0D cond1D cond2D cond3D, vertical recast(bar) barwidth(0.5) fcolor(*.5) ///
ciopts(recast(rcap)) citop  scheme(plottig) plotregion(margin(medium) fcolor(gs15)) legend(off)  ///
xtitle("{bf:Costliness of Obtaining Identification}", size(small)) ///
ytitle("Support for Voter Identification Law", size(medium)) 


	*Republicans
coefplot condpreR cond0R cond1R cond2R cond3R, vertical recast(bar) barwidth(0.5) fcolor(*.5) ///
ciopts(recast(rcap)) citop  scheme(plottig) plotregion(margin(medium) fcolor(gs15)) legend(off)  ///
xtitle("{bf:Costliness of Obtaining Identification}", size(small)) ///
ytitle("Support for Voter Identification Law", size(medium)) 


***********
*Within-subject differences between baseline and assigned condition (see Supplemental Appendix)
***********

	*All respondents
ttest condprescore == cond0score // Baseline vs. Control
ttest condprescore == cond1score // Baseline vs. "+Show Proof"
ttest condprescore == cond2score // Baseline vs. "+Show Proof & No Cost"
ttest condprescore == cond3score // Baselien vs. "+Show Proof + Small Fee"

	*Democrats
ttest condprescore == cond0score if D0R1==0 // Baseline vs. Control
ttest condprescore == cond1score if D0R1==0 // Baseline vs. "+Show Proof"
ttest condprescore == cond2score if D0R1==0 // Baseline vs. "+Show Proof & No Cost"
ttest condprescore == cond3score if D0R1==0 // Baselien vs. "+Show Proof + Small Fee"

	*Republicans
ttest condprescore == cond0score if D0R1==1 // Baseline vs. Control
ttest condprescore == cond1score if D0R1==1 // Baseline vs. "+Show Proof"
ttest condprescore == cond2score if D0R1==1 // Baseline vs. "+Show Proof & No Cost"
ttest condprescore == cond3score if D0R1==1 // Baselien vs. "+Show Proof + Small Fee"

***********
*Logistic regression analyses (see Supplemental Appendix)
* (control = reference category); (0=do not support requirement, 1=support requirement)
***********
	*All respondents
logit vidsupport_post i.expCond  // Control condition as excluded category
margins, at(expCond=(0(1)3))
test 0.expCond=1.expCond=2.expCond // Wald test
logit vidsupport_post b3.expCond  // "+Show Proof + Small Fee" as excluded category

	*Democrats
logit vidsupport_post i.expCond if D0R1==0   
margins, at(expCond=(0(1)3))
logit vidsupport_post b3.expCond if D0R1==0  // "+Show Proof + Small Fee" as excluded category

	*Republicans
logit vidsupport_post i.expCond if D0R1==1 
margins, at(expCond=(0(1)3))
logit vidsupport_post b3.expCond if D0R1==1  // "+Show Proof + Small Fee" as excluded category

***********
***********
